import { createStore } from 'vuex'
const Store = createStore({
    state () {
        return {
            logonInfo:{},
            username: "",
            password: "",
            pic:""
        }
    },
    getters: {
        isLogin: (state) => {
            return state.username.length > 0
        },
        getLogin:(state)=> {
            return state.logonInfo
        },
        
    },
    mutations:{
        setLongin: (state,loginInfoValue) =>{
            state.logonInfo=loginInfoValue;
        }
    }
})
export default Store;